import request from '@/router/axios';

export const getDetailByTaskCodeAndItemId = (current, size, params) => {
  return request({
    url: '/api/vingsoft-middleserver/taskgeneralbasic/getDetailByTaskCodeAndItemId',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
};


export const getSyncDateByTaskCodeAndItemId = (taskCode, taskType, itemId) => {
  return request({
    url: '/api/vingsoft-middleserver/taskgeneralbasic/getSyncDateByTaskCodeAndItemId',
    method: 'get',
    params: {
      taskCode,
      taskType,
      itemId
    }
  })
};


export const materialHistoryPage = (current, size, params) => {
  return request({
    url: '/api/vingsoft-middleserver/taskgeneralbasic/materialHistoryPage',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
};



export const servDuiZhang = () => {
  return request({
    url: '/api/vingsoft-acceptance/serviceItem/servDuiZhang',
    method: 'post',
  })
};

export const getServByItemAndItemCode = (itemId,itemCode) => {
  return request({
    url: '/api/vingsoft-acceptance/serviceItem/getServByItemAndItemCode',
    method: 'post',
    params:{itemId,itemCode}
  })
};


export const getUpdateServCount = () => {
  return request({
    url: '/api/vingsoft-acceptance/serviceItem/getUpdateServCount',
    method: 'post',
  })
};
